package jbpmguice;

import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.instantiation.DefaultProcessClassLoaderFactory;
import org.jbpm.util.ClassLoaderUtil;

public class GuiceProcessClassLoaderFactory extends DefaultProcessClassLoaderFactory {
    static {
        GuiceDelegation.createInstantiatorCache();
    }

    public ClassLoader getProcessClassLoader(ProcessDefinition processDefinition) {
        return new GuiceProcessClassLoader(ClassLoaderUtil.getClassLoader(),
                processDefinition);
    }

}
